<template>
	<view class="content" v-if="list">
		<view class="center">
			<view class="title">
				<view class="titleMsg">
					<text>PICC</text>
					<text>护理包</text>
					<text>×{{list.num}}</text>
				</view>
				<view class="state">
					{{showStatus()}}
				</view>
			</view>
			<view class="msg" v-if="list.consumables">
				<view class="" v-for="(item,index) in list.consumables" :key="index">
					<text class="msgTitle">{{item.bleName}}</text>
					<!-- <text class="number">*10</text> -->
				</view>
				<view class="price">
					￥{{list.price}}
				</view>
			</view>
		</view>
		<view class="tips">购买须知</view>
		<view class="tip">护士首次上门服务时，需准备所需全部耗材包提供给患者！</view>
	</view>
	<view class="none" v-else>
		<image src="../../../static/none/consume.png" mode="" ></image>
		<view class="" >
			暂无耗材包
		</view>
	</view>
</template>

<script>
	import {selectOrderInfo} from '@/apis/order/index.js'
	export default {
		data() {
			return {
				list:'',
				status:''
			}
		},
		onLoad(option) {
			this.number = option.number
			this.get()
			console.log()
		},
		onShow() {
			this.get()
		},
		methods: {
			async get(){
				let number = this.number 
				let res =await selectOrderInfo({number})
				if(res.success){
					this.list = res.object.nurseOrderInfoBagVo
					this.status = res.object.nurseOrderInfoBagVo.status
				}
			},
			showStatus(){
				if(this.status==1){
					return '未配送'
				}else if(this.status==2){
					return '配送中'
				}else if(this.status==3){
					return '已配送'
				}else if(this.status==4){
					return '已取消'
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%	;
		min-height: 100vh;
		background: #F7F7F7;

	}
	.center{
		width: 100%;
		background: #FFFFFF;
		padding: 0 20rpx 20rpx 20rpx;
		box-sizing: border-box;
		.title{
			width: 100%;
			height: 90rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #00CBD0;
			display: flex;
			justify-content: space-between;
			align-items: center;	
			padding: 0 20rpx;
			box-sizing: border-box;
			.titleMsg text{
				margin-right:10rpx ;
			}
		}
		.msg{
			width: 710rpx;
			min-height: 356rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
			border-radius: 20rpx;
			padding: 20rpx;
			box-sizing: border-box;
			position: relative;
			.price{
				position: absolute;
				bottom: 20rpx;
				right: 20rpx;
				text-align: right;
				font-weight: 500;
				font-size: 32rpx;
			}
		}
	}
	.tips{
		width: 128rpx;
		height: 56rpx;
		font-size: 32rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: rgba(0, 0, 0, 0.87);
		line-height: 56rpx;
		margin-top: 32rpx;
		margin-left: 40rpx;
	}
	.tip{
		height: 34rpx;
		font-size: 24rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(0, 0, 0, 0.38);
		line-height: 34rpx;
		margin:0 40rpx;
	}
	.msgTitle{
		height: 50rpx;
		font-size: 28rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 50rpx;
	}
	.none {
		padding-top:180rpx;
		image {
			width: 442rpx;
			height: 308rpx;
			display: block;
			margin:0 auto;
			display: block;
			margin: 0 auto;
		}
	
		view {
			font-weight: 500;
			color: #3E3E3E;
			text-align: center;
			margin-top:80rpx;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			color: rgba(0, 0, 0, 0.87);
		}
	}
</style>
